PATH![]() |
![]() ![]() |
Sets a window's size and position from the bounding rectangle of the specified window region.
pascal OSStatus SetWindowBounds (
WindowPtr window,
WindowRegionCode regionCode,
const Rect *globalBounds);
The SetWindowBounds function sets a window's size and position to that specified by the rectangle that your application passes in the globalBounds parameter. After doing so, SetWindowBounds displays the window.
When you call the SetWindowBounds function, your application specifies whether the window's content region or its structure region is more important in determining the window's ultimate size and position. This distinction can be important with versions of the Mac OS running the Appearance Manager, since the total dimensions of a window--and, therefore, its spatial relationship to the rest of the screen--may vary from appearance to appearance. In general, you should specify kWindowStructureRgn for the regionCode parameter if how the window as a whole relates to a given monitor is more important than the exact positioning of its content on the screen. On the other hand, if you specify kWindowContentRgn for the regionCode parameter because the positioning of your application's content is of greatest concern, then it is important to note that with some appearances some part of the window's structure region or "frame" may extend past the edge of a monitor and not be displayed.
The function GetWindowBounds .